package com.ycrlkj.android.modulespublic.common.net.response;

public enum MResponseCode {

    SUCCESS(2000, "成功"),
    FAIL(4000, "失败"),//toast弹窗
    FAIL_ALERT(4001, "失败"), //alert弹窗, 只有确定键, 无需获得操作结果

    FAIL_MODAL(4002, "失败"), //modal弹窗, 有确定和取消键, 需要取得用户操作结果
    ERROR_AUTH(4010, "无权限"), //无权限
    ERROR_NO_LOGIN(4011, "请登录"), //未登录
    ERROR_TOKEN_EXPIRE(4012, "身份验证过期, 请重新登录"), //登录过期
    ERROR_TOKEN_INVALID(4013, "身份验证失效, 请重新登录"), //登录无效
    ERROR_TOKEN_SIGN_WRONG(4014, "身份验证签名错误, 请重新登录"), //登录无效
    ERROR_404(4040, "请求地址错误"),
    ERROR_500(5000, "服务器错误"),


    /* #region ========================= 安卓前端新增 开始 ====================== */

    ERROR_DATA_PARSE(6000, "json解析失败"),
    ERROR_UNKNOWN(7000, "未知错误");

    /* #endregion ====================== 安卓前端新增 结束 ====================== */


    private final Integer code;
    private final String message;


    MResponseCode(Integer code, String message) {
        this.code = code;
        this.message = message;
    }

    public Integer getCode() {
        return code;
    }

    public String getMessage() {
        return message;
    }

}

